package com.zero.manage.web.components.entity.rbac;

import com.zero.manage.web.components.base.BaseEntity;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.io.Serializable;


@Entity
@Table(name = "sys_user_role")
@Getter
@Setter
@IdClass(UserRoleClass.class)
public class SysUserRoleEntity extends BaseEntity<String> {
    @Id
    @Column(name = "user_id")
    private String userId;
    @Id
    @Column(name = "role_id")
    private String roleId;
}

@Data
class UserRoleClass implements Serializable {
    private String userId;
    private String roleId;
}